
/**
 * 存储localStorage
 */
 export const setStore = (key, val, storage = localStorage) =>
 storage.setItem(key, JSON.stringify(val))


/**
* 获取localStorage
*/
export const getStore = (key, storage = localStorage) =>
 JSON.parse(storage.getItem(key))


/**
* 删除localStorage
*/
export const removeStore = (key, storage = localStorage) =>
 storage.removeItem(key)
/**
* 清除localStorage
*/
export const clearStore = (storage = localStorage) => storage.clear()